package com.ihmp.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="TCurrency",catalog="ihmp")
public class TCurrency implements Serializable {
	
	private static final long serialVersionUID = 101724L;
	
	@Id
	@GeneratedValue
	@Column(name="CurrencyId",unique=true,nullable=false)
	private Integer id;
	
	@Column(name="CurrencyName")
	private String name;
	
	@Column(name="Rank")
	private Integer rank;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name="Creater")
	private TUser creater;
	
	@Column(name="CreateDate")
	private Date createDate;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name="Editer")
	private TUser editer;
	
	@Column(name="EditDate")
	private Date editDate;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getRank() {
		return rank;
	}
	public void setRank(Integer rank) {
		this.rank = rank;
	}
	public TUser getCreater() {
		return creater;
	}
	public void setCreater(TUser creater) {
		this.creater = creater;
	}
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public Date getEditDate() {
		return editDate;
	}
	public void setEditDate(Date editDate) {
		this.editDate = editDate;
	}		
}
